package com.xk857.article.feign;

import com.xk857.article.service.IArticleService;
import com.xk857.article.service.ILabelService;
import com.xk857.entities.Label;
import com.xk857.feign.IFeignArticleController;
import com.xk857.feign.req.UserInfoREQ;
import com.xk857.util.base.NoResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author CV大魔王
 * @Description 文章Feign远程调用
 * @date 2021/2/25 16:11
 */
@Api(tags = "被远程调用文章微服务接口",value = "被远程调用文章微服务接口")
@RestController
public class FeignArticleController implements IFeignArticleController {

    @Autowired
    private ILabelService labelService;

    @Autowired
    private IArticleService articleService;


    @Override
    public List<Label> getLabelListByIds(List<String> ids) {
        return labelService.listByIds(ids);
    }

    @Override
    public boolean updateUserInfo(UserInfoREQ req) {
        return articleService.updateUserInfo(req);
    }
}
